#ifndef MOVEBEHAVIOR_H
#define MOVEBEHAVIOR_H

#include "GameBehavior.h"
#include "GameObject.h"
#include "Direction.h"
#include "GameStep.h"
#include "Movable.h"
#include "Droppable.h"

class MoveBehavior: public GameBehavior
{
public:
	MoveBehavior();
	virtual ~MoveBehavior();

	void Clear();
	void SetInitialObject(GameObject* object, const Direction& direction);
	void SetInitialCell(Cell& cell, const Direction& direction);
	virtual void GenerateSteps(Board& board);
	virtual void Execute();
	
	bool IsEmpty() const;


protected:

private:
	void AddMoveStep(GameObject* object, Movable* movable, Board* board);
	void AddDropStep(GameObject* object, Droppable* droppable);


	GameObject* movingObject;
	Cell* initialCell;
	Direction movingDirection;

	std::list<GameStep*> steps;
};

#endif //MOVEBEHAVIOR_H
